<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script>
function A()
{
	this.abc=12;
}

A.prototype.show=function ()
{
	alert(this.abc);
};

//继承A

function B()
{
	//this->new B()
	A.call(this);
}

B.prototype=A.prototype;

B.prototype.fn=function ()
{
	alert('abc');
};

var objB=new B();
var objA=new A();

objA.fn();
</script>
</head>

<body>
</body>
</html>
